package com.sjd.web.config;

import com.sjd.mall.service.goods.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * @author : Mr.s
 * @version : 1.0
 * @description : 初始化runner
 * @date : 2022-02-11 23:38
 */
@Component
@Order(0)
public class SjdInitRunner implements ApplicationRunner {

    @Autowired
    private GoodsService goodsService;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        goodsService.initBanner();
    }
}
